package com.xq.model.service;

import com.xq.model.entity.TBaseStationState;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Select;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;

/**
 * <p>
 * 站点状态信息表 服务类
 * </p>
 *
 * @author xu
 * @since 2021-08-31
 */
public interface ITBaseStationStateService extends IService<TBaseStationState> {

    /**
     * 再次请求还没上传的数据
     * 注意超过n天的已不再请求
     */
    void againGetStationState(int nDay) throws IllegalAccessException, IOException, URISyntaxException;

    void getStationState(String times) throws IllegalAccessException, IOException, URISyntaxException;

    /**
     * 发送超时状态数据给云端
     * @param stationStateList 将要保存的数据
     */
    void postOverStationState(List<TBaseStationState> stationStateList) throws IOException;

    /**
     * 发送数据给云端
     * @param stationStateList 将要保存的数据
     */
    void postStationState(List<TBaseStationState> stationStateList) throws IOException;

    /**
     * 设置访问故障的状态 即超时或者未报
     * @param stationStateList 状态集合
     * @param type 2-缺报 3-超时
     */
    void badState(List<TBaseStationState> stationStateList,String type) throws IOException;
}
